/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * 数据管理系统DMS
 * 数据管理系统DMS
 *
 * OpenAPI spec version: v1
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using JDCloudSDK.Core.Auth;
using JDCloudSDK.Core.Client;
using JDCloudSDK.Core.Http;
using JDCloudSDK.Dms.Apis;
using JDCloudSDK.Dms.Model;
using System;
using System.Collections.Generic;
using System.Text;
#if NET40||NET35
#else
using System.Threading.Tasks;
#endif

namespace JDCloudSDK.Dms.Client
{
    /// <summary>
    ///  数据管理系统DMS
    ///  数据管理系统DMS
    ///  Dms Api 客户端
    ///</summary>
    public class DmsClient : JdcloudClient
    {

        /// <summary>
        ///  默认私有构造函数
        /// </summary>
        private DmsClient()
        {

        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="environment">sdk 环境配置信息</param>
        public DmsClient(CredentialsProvider credentialsProvider, HttpRequestConfig httpRequestConfig,SDKEnvironment environment)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
            this.environment = environment;
        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="credentialsProvider">认证信息</param>
        public DmsClient(CredentialsProvider credentialsProvider,HttpRequestConfig httpRequestConfig)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        /// 默认构造函数，
        /// 注意如果使用此方法 httpRequestConfig 使用的http 请求 schema 为Https
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        public DmsClient(CredentialsProvider credentialsProvider)
        {
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        ///  版本号 1.2.8
        ///</summary>
        public const string ClientVersion = "1.2.8";

        private const string apiVersion = "v1";
        private const string userAgentPrefix = "JdcloudSdkDotNet";
        private const string defaultEndpoint = "dms.jdcloud-api.com";
        private const string serviceName = "dms";
        private const string userAgent = userAgentPrefix + "/" + ClientVersion + " " + serviceName + "/" + apiVersion;


        private SDKEnvironment environment = new SDKEnvironment(defaultEndpoint);
        private CredentialsProvider credentialsProvider;
        private HttpRequestConfig httpRequestConfig;

        /// <summary>
        ///  获取证书信息
        ///</summary>
        public override CredentialsProvider CredentialsProvider   { get { return credentialsProvider; } }

        /// <summary>
        ///  获取http 客户端配置信息
        ///</summary>
        public override HttpRequestConfig HttpRequestConfig { get { return httpRequestConfig; } }

        /// <summary>
        ///  获取sdk环境配置信息
        ///</summary>
        public override SDKEnvironment SDKEnvironment { get { return environment; } }

        /// <summary>
        ///  获取用户自定义浏览器识别字符串
        ///</summary>
        public override string UserAgent { get { return userAgent; } }

        /// <summary>
        ///  获取服务名称
        ///</summary>
        public override string ServiceName { get { return serviceName; } }

        /// <summary>
        ///  获取版本号
        ///</summary>
        public override string Version { get { return apiVersion; } }



#if NET40||NET35
        /// <summary>
        ///  查询用户实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public QueryInstanceResponse QueryInstance(QueryInstanceRequest request) {
            return  new QueryInstanceExecutor().Client(this).Execute<QueryInstanceResponse, QueryInstanceResult, QueryInstanceRequest>(request);
        }
#else
        /// <summary>
        ///  查询用户实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<QueryInstanceResponse> QueryInstance(QueryInstanceRequest request) {
            return await new QueryInstanceExecutor().Client(this).Execute<QueryInstanceResponse, QueryInstanceResult, QueryInstanceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  执行sql语句
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ConsoleSqlResponse ConsoleSql(ConsoleSqlRequest request) {
            return  new ConsoleSqlExecutor().Client(this).Execute<ConsoleSqlResponse, ConsoleSqlResult, ConsoleSqlRequest>(request);
        }
#else
        /// <summary>
        ///  执行sql语句
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ConsoleSqlResponse> ConsoleSql(ConsoleSqlRequest request) {
            return await new ConsoleSqlExecutor().Client(this).Execute<ConsoleSqlResponse, ConsoleSqlResult, ConsoleSqlRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  执行sql语句
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public OpenTableResponse OpenTable(OpenTableRequest request) {
            return  new OpenTableExecutor().Client(this).Execute<OpenTableResponse, OpenTableResult, OpenTableRequest>(request);
        }
#else
        /// <summary>
        ///  执行sql语句
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<OpenTableResponse> OpenTable(OpenTableRequest request) {
            return await new OpenTableExecutor().Client(this).Execute<OpenTableResponse, OpenTableResult, OpenTableRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  sql格式化
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public FormatSqlResponse FormatSql(FormatSqlRequest request) {
            return  new FormatSqlExecutor().Client(this).Execute<FormatSqlResponse, FormatSqlResult, FormatSqlRequest>(request);
        }
#else
        /// <summary>
        ///  sql格式化
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<FormatSqlResponse> FormatSql(FormatSqlRequest request) {
            return await new FormatSqlExecutor().Client(this).Execute<FormatSqlResponse, FormatSqlResult, FormatSqlRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取表元数据
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public TableInfoResponse TableInfo(TableInfoRequest request) {
            return  new TableInfoExecutor().Client(this).Execute<TableInfoResponse, TableInfoResult, TableInfoRequest>(request);
        }
#else
        /// <summary>
        ///  获取表元数据
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<TableInfoResponse> TableInfo(TableInfoRequest request) {
            return await new TableInfoExecutor().Client(this).Execute<TableInfoResponse, TableInfoResult, TableInfoRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  sql导入
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ImportDdlDmlResponse ImportDdlDml(ImportDdlDmlRequest request) {
            return  new ImportDdlDmlExecutor().Client(this).Execute<ImportDdlDmlResponse, ImportDdlDmlResult, ImportDdlDmlRequest>(request);
        }
#else
        /// <summary>
        ///  sql导入
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ImportDdlDmlResponse> ImportDdlDml(ImportDdlDmlRequest request) {
            return await new ImportDdlDmlExecutor().Client(this).Execute<ImportDdlDmlResponse, ImportDdlDmlResult, ImportDdlDmlRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  打开实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public OpenResponse Open(OpenRequest request) {
            return  new OpenExecutor().Client(this).Execute<OpenResponse, OpenResult, OpenRequest>(request);
        }
#else
        /// <summary>
        ///  打开实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<OpenResponse> Open(OpenRequest request) {
            return await new OpenExecutor().Client(this).Execute<OpenResponse, OpenResult, OpenRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  批量建表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateTableBatchResponse CreateTableBatch(CreateTableBatchRequest request) {
            return  new CreateTableBatchExecutor().Client(this).Execute<CreateTableBatchResponse, CreateTableBatchResult, CreateTableBatchRequest>(request);
        }
#else
        /// <summary>
        ///  批量建表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateTableBatchResponse> CreateTableBatch(CreateTableBatchRequest request) {
            return await new CreateTableBatchExecutor().Client(this).Execute<CreateTableBatchResponse, CreateTableBatchResult, CreateTableBatchRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取数据库中的表列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public TableListResponse TableList(TableListRequest request) {
            return  new TableListExecutor().Client(this).Execute<TableListResponse, TableListResult, TableListRequest>(request);
        }
#else
        /// <summary>
        ///  获取数据库中的表列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<TableListResponse> TableList(TableListRequest request) {
            return await new TableListExecutor().Client(this).Execute<TableListResponse, TableListResult, TableListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  退出登录
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public LogoutResponse Logout(LogoutRequest request) {
            return  new LogoutExecutor().Client(this).Execute<LogoutResponse, LogoutResult, LogoutRequest>(request);
        }
#else
        /// <summary>
        ///  退出登录
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<LogoutResponse> Logout(LogoutRequest request) {
            return await new LogoutExecutor().Client(this).Execute<LogoutResponse, LogoutResult, LogoutRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  数据导出
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ExportDataResponse ExportData(ExportDataRequest request) {
            return  new ExportDataExecutor().Client(this).Execute<ExportDataResponse, ExportDataResult, ExportDataRequest>(request);
        }
#else
        /// <summary>
        ///  数据导出
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ExportDataResponse> ExportData(ExportDataRequest request) {
            return await new ExportDataExecutor().Client(this).Execute<ExportDataResponse, ExportDataResult, ExportDataRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取当前实例用户查询sql历史
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public HistorySqlResponse HistorySql(HistorySqlRequest request) {
            return  new HistorySqlExecutor().Client(this).Execute<HistorySqlResponse, HistorySqlResult, HistorySqlRequest>(request);
        }
#else
        /// <summary>
        ///  获取当前实例用户查询sql历史
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<HistorySqlResponse> HistorySql(HistorySqlRequest request) {
            return await new HistorySqlExecutor().Client(this).Execute<HistorySqlResponse, HistorySqlResult, HistorySqlRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取数据导出Id
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public GetExportDataIdResponse GetExportDataId(GetExportDataIdRequest request) {
            return  new GetExportDataIdExecutor().Client(this).Execute<GetExportDataIdResponse, GetExportDataIdResult, GetExportDataIdRequest>(request);
        }
#else
        /// <summary>
        ///  获取数据导出Id
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<GetExportDataIdResponse> GetExportDataId(GetExportDataIdRequest request) {
            return await new GetExportDataIdExecutor().Client(this).Execute<GetExportDataIdResponse, GetExportDataIdResult, GetExportDataIdRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  执行计划
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ConsoleExplainResponse ConsoleExplain(ConsoleExplainRequest request) {
            return  new ConsoleExplainExecutor().Client(this).Execute<ConsoleExplainResponse, ConsoleExplainResult, ConsoleExplainRequest>(request);
        }
#else
        /// <summary>
        ///  执行计划
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ConsoleExplainResponse> ConsoleExplain(ConsoleExplainRequest request) {
            return await new ConsoleExplainExecutor().Client(this).Execute<ConsoleExplainResponse, ConsoleExplainResult, ConsoleExplainRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取sql中建表语句，表中列信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SqlTableInfoResponse SqlTableInfo(SqlTableInfoRequest request) {
            return  new SqlTableInfoExecutor().Client(this).Execute<SqlTableInfoResponse, SqlTableInfoResult, SqlTableInfoRequest>(request);
        }
#else
        /// <summary>
        ///  获取sql中建表语句，表中列信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SqlTableInfoResponse> SqlTableInfo(SqlTableInfoRequest request) {
            return await new SqlTableInfoExecutor().Client(this).Execute<SqlTableInfoResponse, SqlTableInfoResult, SqlTableInfoRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除收藏sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeletePersonalSqlResponse DeletePersonalSql(DeletePersonalSqlRequest request) {
            return  new DeletePersonalSqlExecutor().Client(this).Execute<DeletePersonalSqlResponse, DeletePersonalSqlResult, DeletePersonalSqlRequest>(request);
        }
#else
        /// <summary>
        ///  删除收藏sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeletePersonalSqlResponse> DeletePersonalSql(DeletePersonalSqlRequest request) {
            return await new DeletePersonalSqlExecutor().Client(this).Execute<DeletePersonalSqlResponse, DeletePersonalSqlResult, DeletePersonalSqlRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取数据库实例的库列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DatabaseListResponse DatabaseList(DatabaseListRequest request) {
            return  new DatabaseListExecutor().Client(this).Execute<DatabaseListResponse, DatabaseListResult, DatabaseListRequest>(request);
        }
#else
        /// <summary>
        ///  获取数据库实例的库列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DatabaseListResponse> DatabaseList(DatabaseListRequest request) {
            return await new DatabaseListExecutor().Client(this).Execute<DatabaseListResponse, DatabaseListResult, DatabaseListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  rds，drds登录实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public LoginResponse Login(LoginRequest request) {
            return  new LoginExecutor().Client(this).Execute<LoginResponse, LoginResult, LoginRequest>(request);
        }
#else
        /// <summary>
        ///  rds，drds登录实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<LoginResponse> Login(LoginRequest request) {
            return await new LoginExecutor().Client(this).Execute<LoginResponse, LoginResult, LoginRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  表结构数据导出文件下载
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DownloadExportFileResponse DownloadExportFile(DownloadExportFileRequest request) {
            return  new DownloadExportFileExecutor().Client(this).Execute<DownloadExportFileResponse, DownloadExportFileResult, DownloadExportFileRequest>(request);
        }
#else
        /// <summary>
        ///  表结构数据导出文件下载
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DownloadExportFileResponse> DownloadExportFile(DownloadExportFileRequest request) {
            return await new DownloadExportFileExecutor().Client(this).Execute<DownloadExportFileResponse, DownloadExportFileResult, DownloadExportFileRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  生成修改表结构语句sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public GeneralAlterTableSqlResponse GeneralAlterTableSql(GeneralAlterTableSqlRequest request) {
            return  new GeneralAlterTableSqlExecutor().Client(this).Execute<GeneralAlterTableSqlResponse, GeneralAlterTableSqlResult, GeneralAlterTableSqlRequest>(request);
        }
#else
        /// <summary>
        ///  生成修改表结构语句sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<GeneralAlterTableSqlResponse> GeneralAlterTableSql(GeneralAlterTableSqlRequest request) {
            return await new GeneralAlterTableSqlExecutor().Client(this).Execute<GeneralAlterTableSqlResponse, GeneralAlterTableSqlResult, GeneralAlterTableSqlRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  表结构导出
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ExportStructResponse ExportStruct(ExportStructRequest request) {
            return  new ExportStructExecutor().Client(this).Execute<ExportStructResponse, ExportStructResult, ExportStructRequest>(request);
        }
#else
        /// <summary>
        ///  表结构导出
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ExportStructResponse> ExportStruct(ExportStructRequest request) {
            return await new ExportStructExecutor().Client(this).Execute<ExportStructResponse, ExportStructResult, ExportStructRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取当前实例用户查询导入数据sql历史
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public HistoryImportDataResponse HistoryImportData(HistoryImportDataRequest request) {
            return  new HistoryImportDataExecutor().Client(this).Execute<HistoryImportDataResponse, HistoryImportDataResult, HistoryImportDataRequest>(request);
        }
#else
        /// <summary>
        ///  获取当前实例用户查询导入数据sql历史
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<HistoryImportDataResponse> HistoryImportData(HistoryImportDataRequest request) {
            return await new HistoryImportDataExecutor().Client(this).Execute<HistoryImportDataResponse, HistoryImportDataResult, HistoryImportDataRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  收藏sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AddPersonalSqlResponse AddPersonalSql(AddPersonalSqlRequest request) {
            return  new AddPersonalSqlExecutor().Client(this).Execute<AddPersonalSqlResponse, AddPersonalSqlResult, AddPersonalSqlRequest>(request);
        }
#else
        /// <summary>
        ///  收藏sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AddPersonalSqlResponse> AddPersonalSql(AddPersonalSqlRequest request) {
            return await new AddPersonalSqlExecutor().Client(this).Execute<AddPersonalSqlResponse, AddPersonalSqlResult, AddPersonalSqlRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  更新收藏sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdatePersonalSqlResponse UpdatePersonalSql(UpdatePersonalSqlRequest request) {
            return  new UpdatePersonalSqlExecutor().Client(this).Execute<UpdatePersonalSqlResponse, UpdatePersonalSqlResult, UpdatePersonalSqlRequest>(request);
        }
#else
        /// <summary>
        ///  更新收藏sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdatePersonalSqlResponse> UpdatePersonalSql(UpdatePersonalSqlRequest request) {
            return await new UpdatePersonalSqlExecutor().Client(this).Execute<UpdatePersonalSqlResponse, UpdatePersonalSqlResult, UpdatePersonalSqlRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  生成数据
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ConsoleGeneralDataResponse ConsoleGeneralData(ConsoleGeneralDataRequest request) {
            return  new ConsoleGeneralDataExecutor().Client(this).Execute<ConsoleGeneralDataResponse, ConsoleGeneralDataResult, ConsoleGeneralDataRequest>(request);
        }
#else
        /// <summary>
        ///  生成数据
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ConsoleGeneralDataResponse> ConsoleGeneralData(ConsoleGeneralDataRequest request) {
            return await new ConsoleGeneralDataExecutor().Client(this).Execute<ConsoleGeneralDataResponse, ConsoleGeneralDataResult, ConsoleGeneralDataRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  生成表结构数据导出下载Id
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public GetExportIdResponse GetExportId(GetExportIdRequest request) {
            return  new GetExportIdExecutor().Client(this).Execute<GetExportIdResponse, GetExportIdResult, GetExportIdRequest>(request);
        }
#else
        /// <summary>
        ///  生成表结构数据导出下载Id
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<GetExportIdResponse> GetExportId(GetExportIdRequest request) {
            return await new GetExportIdExecutor().Client(this).Execute<GetExportIdResponse, GetExportIdResult, GetExportIdRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取当前实例用户收藏sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public QueryPersonalSqlsResponse QueryPersonalSqls(QueryPersonalSqlsRequest request) {
            return  new QueryPersonalSqlsExecutor().Client(this).Execute<QueryPersonalSqlsResponse, QueryPersonalSqlsResult, QueryPersonalSqlsRequest>(request);
        }
#else
        /// <summary>
        ///  获取当前实例用户收藏sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<QueryPersonalSqlsResponse> QueryPersonalSqls(QueryPersonalSqlsRequest request) {
            return await new QueryPersonalSqlsExecutor().Client(this).Execute<QueryPersonalSqlsResponse, QueryPersonalSqlsResult, QueryPersonalSqlsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取批量建表sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public GetCreateTableBatchSqlResponse GetCreateTableBatchSql(GetCreateTableBatchSqlRequest request) {
            return  new GetCreateTableBatchSqlExecutor().Client(this).Execute<GetCreateTableBatchSqlResponse, GetCreateTableBatchSqlResult, GetCreateTableBatchSqlRequest>(request);
        }
#else
        /// <summary>
        ///  获取批量建表sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<GetCreateTableBatchSqlResponse> GetCreateTableBatchSql(GetCreateTableBatchSqlRequest request) {
            return await new GetCreateTableBatchSqlExecutor().Client(this).Execute<GetCreateTableBatchSqlResponse, GetCreateTableBatchSqlResult, GetCreateTableBatchSqlRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取Dms域名
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public GetDmsDomainResponse GetDmsDomain(GetDmsDomainRequest request) {
            return  new GetDmsDomainExecutor().Client(this).Execute<GetDmsDomainResponse, GetDmsDomainResult, GetDmsDomainRequest>(request);
        }
#else
        /// <summary>
        ///  获取Dms域名
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<GetDmsDomainResponse> GetDmsDomain(GetDmsDomainRequest request) {
            return await new GetDmsDomainExecutor().Client(this).Execute<GetDmsDomainResponse, GetDmsDomainResult, GetDmsDomainRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  生成建表语句sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public GeneralCreateTableSqlResponse GeneralCreateTableSql(GeneralCreateTableSqlRequest request) {
            return  new GeneralCreateTableSqlExecutor().Client(this).Execute<GeneralCreateTableSqlResponse, GeneralCreateTableSqlResult, GeneralCreateTableSqlRequest>(request);
        }
#else
        /// <summary>
        ///  生成建表语句sql
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<GeneralCreateTableSqlResponse> GeneralCreateTableSql(GeneralCreateTableSqlRequest request) {
            return await new GeneralCreateTableSqlExecutor().Client(this).Execute<GeneralCreateTableSqlResponse, GeneralCreateTableSqlResult, GeneralCreateTableSqlRequest>(request).ConfigureAwait(false);
        }
#endif

            /// <summary>
            ///  默认DmsClient 构造器 接口
            ///</summary>
            public interface Builder
            {

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>dmsClient 构造器</returns>
                Builder CredentialsProvider(CredentialsProvider provider);

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>dmsClient 构造器</returns>
                Builder Environment(Core.Client.SDKEnvironment environment);

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>dmsClient 构造器</returns>
                Builder HttpRequestConfig(HttpRequestConfig config);

                /// <summary>
                ///  构造DmsClient 对象
                ///</summary>
                DmsClient Build();
            }

            /// <summary>
            ///  默认DmsClient 构造器
            ///</summary>
            public class DefaultBuilder : Builder
            {
                /// <summary>
                ///  DmsClient service client
                /// </summary>
                private  DmsClient dmsClient;

                /// <summary>
                ///  默认DmsClient 构造器构造对象
                ///</summary>
                public DefaultBuilder()
                {
                    dmsClient = new DmsClient();
                }

                /// <summary>
                ///  构造DmsClient 对象
                ///</summary>
                public DmsClient Build()
                {
                    if (dmsClient.CredentialsProvider == null)
                    {
                        //if credentialsProvider not set, try load jdcloud global default  credentials provider
                        dmsClient.credentialsProvider = JdCloud.DefaultInstance.GetCredentialsProvider();
                        if (dmsClient.credentialsProvider == null)
                        {
                            throw new ArgumentNullException("DmsClient build error: jdcloud credentials provider not set");
                        }
                    }
                    if (dmsClient.HttpRequestConfig == null)
                    {
                        dmsClient.httpRequestConfig = JdCloud.DefaultInstance.GetHttpRequestConfig();
                        if (dmsClient.httpRequestConfig == null)
                        {
                        throw new ArgumentNullException("DmsClient build error: http request config not set");
                        }
                    }
                    return dmsClient;
                }

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>dmsClient 构造器</returns>
                public Builder CredentialsProvider(CredentialsProvider provider)
                {
                    dmsClient.credentialsProvider = provider;
                    return this;
                }

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>dmsClient 构造器</returns>
                public Builder Environment(SDKEnvironment environment)
                {
                    dmsClient.environment = environment;
                    return this;
                }

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>dmsClient 构造器</returns>
                public Builder HttpRequestConfig(HttpRequestConfig config)
                {
                    dmsClient.httpRequestConfig = config;
                    return this;
                }
            }
    }
}
